<?php
/*
	[BuyPg] (C) 2010-2011 Buypg
	$Id: OpAction.class.php 2011-6-7 9:57:45 wufujun $
*/
if (!defined('THINK_PATH')) {
	exit('Access Denied');
}

class OpAction extends BpAction{
	public function yulan(){
		global $_SGLOBAL;
		C ( 'SHOW_PAGE_TRACE', false ); //关闭调试信息
		if($_GET['siteid']){
			$siteid = isset($_GET['siteid']) ? intval($_GET['siteid']) : 0;
		}elseif($_POST['siteid']){
			$siteid = isset($_POST['siteid']) ? intval($_POST['siteid']) : 0;
		}
		$imagPath = $_SERVER["DOCUMENT_ROOT"].__ROOT__."/Public/images/siteimages/$siteid.jpg";
		if(file_exists($imagPath)){
			$Images = __ROOT__."/Public/images/siteimages/$siteid.jpg";
		}else {
			$Images = __ROOT__."/Public/images/noimage.jpg";
		}
		
		$DbSite = M("NbSite");
		$arrSite = $DbSite->where("site_id = $siteid and flag = 1")->find();
		
		//模板输出
		$this->assign('Images' , $Images);
		$this->assign('arrSite' , $arrSite);
		$this->display();
	}
}
?>
